package com.micro.frog.rbac.util;

import com.micro.frog.rbac.dto.UserDetail;
import com.micro.frog.rbac.utils.CacheUtil;

import javax.servlet.http.HttpServletRequest;

/**
 * @author :  ljh
 * @date : 2018/4/10
 **/
public class SubjectUtil {

    public static UserDetail getUser(HttpServletRequest request) {
        String token = CookieUtil.getToken(request);
        return CacheUtil.get(token, UserDetail.class);
    }

}
